package com.weiwen.domain;

import java.io.Serializable;
import java.sql.Timestamp;
import java.text.DateFormat;
import java.util.Date;

import com.weiwen.util.DateUtil;

public class News implements Serializable{
	private static final long serialVersionUID = -7330306573405197236L;
	
	private long id;
	// 标题
	private String title;
	//短新闻内容
	private String content;
	//详细新闻内容
	private String detailContent;
	//新闻类型的id
	private int typeId;
	//新闻类型名称
	private String typeName;
	//录入本系统时间
	private String entryTime;
	//媒体发布新闻的时间
	private String publishTime;
	//新闻状态，0：删除，1：正常，2：审核中
	private int statu;
	//新闻来源的id
	private int resourceId;
	//新闻来源的名称
	private String resourceName;
	//图片数量
	private int picNum;
	//评论的个数
	private int commentNum;
	//分享的个数
	private int shareNum;
	//新闻的url
	private String newsUrl;
	private Timestamp entrytime;
	private Timestamp publishtime;
	 
	public void setPublishtime(Timestamp publishtime) {
		this.publishtime = publishtime;
		setPublishTime(DateUtil.dateToString(publishtime, "yyyy-MM-dd hh:mm:ss"));
	}
	public void setEntrytime(Timestamp entrytime) {
		this.entrytime = entrytime;
		setEntryTime(DateUtil.dateToString(entrytime, "yyyy-MM-dd hh:mm:ss"));
	}
	/*public String toLocaleString() {
		DateFormat formatter = DateFormat.getDateTimeInstance();
		return formatter.format(this);
	}*/
	
	
	public long getId() {
		return id;
	}
	public int getCommentNum() {
		return commentNum;
	}
	public void setCommentNum(int commentNum) {
		this.commentNum = commentNum;
	}
	public int getShareNum() {
		return shareNum;
	}
	public void setShareNum(int shareNum) {
		this.shareNum = shareNum;
	}
	public void setId(long id) {
		this.id = id;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getDetailContent() {
		return detailContent;
	}
	public void setDetailContent(String detailContent) {
		this.detailContent = detailContent;
	}
	public int getTypeId() {
		return typeId;
	}
	public void setTypeId(int typeId) {
		this.typeId = typeId;
	}
	public String getTypeName() {
		return typeName;
	}
	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}
	public String getEntryTime() {
		return entryTime;
	}
	public void setEntryTime(String entryTime) {
		this.entryTime = entryTime;
	}
	public String getPublishTime() {
		return publishTime;
	}
	public void setPublishTime(String publishTime) {
		this.publishTime = publishTime;
	}
	public int getStatu() {
		return statu;
	}
	public void setStatu(int statu) {
		this.statu = statu;
	}
	public int getResourceId() {
		return resourceId;
	}
	public void setResourceId(int resourceId) {
		this.resourceId = resourceId;
	}
	public String getResourceName() {
		return resourceName;
	}
	public void setResourceName(String resourceName) {
		this.resourceName = resourceName;
	}
	public int getPicNum() {
		return picNum;
	}
	public void setPicNum(int picNum) {
		this.picNum = picNum;
	}
	public String getNewsUrl() {
		return newsUrl;
	}
	public void setNewsUrl(String newsUrl) {
		this.newsUrl = newsUrl;
	}
	
}
